import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int n = num.nextInt();
        int count = 0;
        
        if(n % 2 == 1){
            n = n * 3 + 1;
        }else{
            n = n / 2 ;
        }
    }
}
